<template>
	<view class="box">
		<view class="date-box">
			<uni-datetime-picker :border="false" rangeSeparator="至" v-model="range" type="daterange" />
			<view class="query-btn">
				统计
			</view>
		</view>
		<view class="settlement-content">
			<view class="settlement-year">
				<view class="settlement-day">
					<view class="settlement-day-left">
						<view class="settlement-day-title">
							日工
						</view>
						<view class="settlement-day-time">
							<view class="work">
								上班：一个工
							</view>
							<view class="work mt">
								加班：2.5小时
							</view>
						</view>
					</view>
					<view class="settlement-day-right">
						450.00
					</view>
				</view>
				<view class="settlement-day settlement-day2">
					<view class="settlement-day-left">
						<view class="settlement-day-title">
							借支
						</view>
						<view class="settlement-day-time">
							<view class="work">
								1笔
							</view>
						</view>
					</view>
					<view class="settlement-day-right">
						450.00
					</view>
				</view>
			</view>
			<view class="settlement-year" v-for="(item,index) in dataList" :key="index">
				<view class="settlement-time">
					{{item.fullDate}}
				</view>
				<!-- 日工 -->
				<view class="settlement-day" v-if="item.type==1||item.type==3">
					<view class="settlement-day-left">
						<view class="settlement-day-title">
							日工
						</view>
						<view class="settlement-day-time">
							<view class="work">
								上班：一个工
							</view>
							<view class="work mt">
								加班：2.5小时
							</view>
						</view>
					</view>
					<view class="settlement-day-right">
						450.00
					</view>
				</view>
				<!-- 借支 -->
				<view class="settlement-day settlement-day2" v-if="item.type==1||item.type==2">
					<view class="settlement-day-left">
						<view class="settlement-day-title">
							借支
						</view>
						<view class="settlement-day-time">
							<view class="work">
								1笔
							</view>
						</view>
					</view>
					<view class="settlement-day-right">
						450.00
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				range: [],
				// type : 1 日工和借支 2 借支 3 日工
				dataList: [{
						fullDate: '2024年5月1日',
						income: {

						},
						type: '1'
					},
					{
						fullDate: '2024年5月2日',
						income: {

						},
						type: '2'
					},
					{
						fullDate: '2025年5月3日',
						income: {

						},
						type: '3'
					},
				]
			};
		},
		methods: {
			maskClick(e) {
				console.log('maskClick事件:', e);
			}
		}
	}
</script>

<style lang="scss" scoped>
	.box {
		.date-box {
			height: 87rpx;
			background: #F5F5FC;
			font-weight: 500;
			font-size: 28rpx;
			color: #666666;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin: 0rpx 0 30rpx 0;
			
			/deep/ .uni-date-range .uniui-calendar {
				display: none;
			}

			/deep/ .uni-date-x {
				background-color: transparent;
				width: 80%;
			}

			.query-btn {
				width: 80rpx;
				height: 42rpx;
				line-height: 42rpx;
				text-align: center;
				background: #3A92FF;
				border-radius: 6rpx;
				margin-right: 74rpx;
				font-weight: 500;
				font-size: 26rpx;
				color: #FFFFFF;
			}
		}

		.settlement-content {
			overflow-y: auto;
			padding: 0 30rpx 30rpx 30rpx;

			.settlement-year {

				.settlement-year-top {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-top: 36rpx;

					.t1 {
						font-weight: bold;
						font-size: 32rpx;
						color: #222222;
					}

					.t2 {
						font-weight: 500;
						font-size: 26rpx;
						color: #0030FF;
					}
				}

				.settlement-time {
					font-weight: 500;
					font-size: 30rpx;
					color: #222222;
					margin-top: 33rpx;
					margin-bottom: 30rpx;
				}

				.settlement-day {
					background: #F5F5FC;
					border-radius: 12rpx;
					padding: 31rpx 43rpx 38rpx 27rpx;
					display: flex;
					justify-content: space-between;

					.settlement-day-left {
						display: flex;

						.settlement-day-title {
							font-weight: bold;
							font-size: 30rpx;
							color: #222222;
						}

						.settlement-day-time {
							margin-left: 61rpx;

							.work {
								font-weight: 500;
								font-size: 30rpx;
								color: #222222;
							}

							.mt {
								margin-top: 24rpx;
							}
						}
					}

					.settlement-day-right {
						font-weight: bold;
						font-size: 30rpx;
						color: #222222;
					}
				}

				.settlement-day2 {
					margin-top: 20rpx;
				}
			}
		}
	}
</style>